package com.sms.day_report;

import java.util.List;
import java.util.Map;

import com.sms.DB.OperateDB;

public class Reportto {
	private String toid;
	
	private String name;
	
	public void init(Map map){
		//if(map == null)System.out.println("null");
		//System.out.println((Integer)map.get("p_reportid"));
		this.setToid((String)map.get("toid"));
		this.setName((String)map.get("name"));			
	}	
	
	//获取向谁汇报的编号、姓名	
	public static List<Map> query(){
		String sql="select sno as toid,sname as name from stuinfo,groupinfo where leaderid=sno  union select tno as toid,tname as name from teacherinfo "; 

		return OperateDB.executeQuery(sql);	
	}
	public String getToid() {
		return toid;
	}
	public void setToid(String toid) {
		this.toid = toid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	

}
